﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Photo.aspx.cs" Inherits="d3PrtDgn.Web.Photo"
	MasterPageFile="~/Web/d3PrtDgnTemplate.Master" %>

<asp:Content ID="body" ContentPlaceHolderID="body" runat="server">
	<asp:LinkButton runat="server" ID="lnkBack" OnClick="BackToAlbum" />
	
	<h2><asp:Label runat="server" ID="lblPhotoName" /></h2>
	<em class="photoDescription"><asp:Label runat="server" ID="lblDescription" /></em>

	<div class="photoDetail">
		<a runat="server" id="lnkDetail" onclick="return !window.open(this.href)">
			<asp:Image runat="server" ID="imgDetail" />
		</a>
	</div>
	
	<div class="rating">
		<asp:Label runat="server" ID="lblRating" />: <asp:Label runat="server" ID="lblRatingValue" />
		(<asp:Label runat="server" ID="lblVotesValue" /> <asp:Label runat="server" ID="lblVotes" />)
		<asp:Panel runat="server" ID="pnlVote" Visible="false">
			<asp:DropDownList runat="server" ID="ddlRating" />
			<asp:Button runat="server" ID="btnVote" OnClick="SaveVote" />
		</asp:Panel>
	</div>
	<br /><br />
	<h3><%= GetMessage("commentsHeader") %></h3>	
	<asp:Repeater runat="server" ID="repCommnets">
		<ItemTemplate>
			<div class="comment">
				<em><%# DataBinder.Eval(Container.DataItem, "User.Username") %> (<%# DataBinder.Eval(Container.DataItem, "Inserted") %>)</em>
				<%# DataBinder.Eval(Container.DataItem, "Content") %>
			</div>
		</ItemTemplate>
	</asp:Repeater>
	
	<div class="insertComment">
		<strong><asp:Label runat="server" ID="lblInsertComment" /></strong><br />
		<asp:Panel runat="server" ID="pnlInsertComment" Visible="false">
			<span class="error"><spring:ValidationError runat="server" id="contentErrors" /></span><br />
			<asp:TextBox runat="server" ID="tbContent" TextMode="MultiLine" Rows="5" Columns="50" /><br />
			<asp:Button runat="server" ID="btnSave" OnClick="Save" />
		</asp:Panel>
		<asp:Label runat="server" CssClass="error" ID="lblLoginToPost" Visible="false" />
	</div>
	
</asp:Content>